package com.example.design.b.facade;

/**
 * 外观模式类
 */
public class AlipaySystem {
    // 电力公司系统
    private final ElectricCompany electricCompany = new ElectricCompany();

    // 自来水公司系统
    private final WaterCompany waterCompany = new WaterCompany();

    // 联通公司
    private final Unicom unicom = new Unicom();

    public void payElectric() {
        electricCompany.pay();
    }

    public void payWater() {
        waterCompany.pay();
    }

    public void payUnicom() {
        unicom.pay();
    }
}
